package com.mlh.graph;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;

public class Graph {
    HashMap<Integer,Node>nodes;
    HashSet<Edge>edges;
}
class Node{
    //入度
    int in;
    //出度
    int out;
    int value;
    ArrayList<Node>nexts;//出度节点
    ArrayList<Edge>edges;//出度边
}

class Edge{
    int weight;
    Node from;
    Node to;
    public Edge(int weight, Node from, Node to) {
        this.weight = weight;
        this.from = from;
        this.to = to;
    }
}